﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace SmartFactory.Controllers
{
    public class WorksheetsController : Controller
	{
		private readonly IpAddressesConfig _ipAddressesConfig;

		public WorksheetsController(IOptions<IpAddressesConfig> ipAddressesConfig)
		{
			_ipAddressesConfig = ipAddressesConfig.Value;
		}
		/// <summary>
		/// 工单列表
		/// </summary>
		/// <returns></returns>
		public IActionResult WorksheetList()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
        }
        /// <summary>
        /// 工单新增
        /// </summary>
        /// <returns></returns>
        public IActionResult WorksheetAdd()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}
		/// <summary>
		/// 工单获取对应数据
		/// </summary>
		/// <returns></returns>
		public IActionResult WorksheetShow()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}

		/// <summary>
		/// 工单打印
		/// </summary>
		/// <returns></returns>
		public IActionResult WorksheetPrint()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}



	}
}
